package com.project.slsx.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.project.slsx.R;
import com.project.slsx.bean.GoodsBean;

public class GuadanDetailAdapter extends BaseQuickAdapter<GoodsBean, BaseViewHolder> {
    public GuadanDetailAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder holder, GoodsBean item) {
        holder.setText(R.id.tv_guadan_detail_title, item.getTitle());
        holder.setText(R.id.tv_guadan_detail_price, String.valueOf(item.getPrice()));
        holder.setText(R.id.tv_guadan_detail_number, String.valueOf(item.getNumber()));
        holder.setText(R.id.tv_guadan_detail_sumprice, item.isZengsong() ? "0" :
                String.valueOf(item.getPrice() * item.getNumber()));
    }
}
